package com.cda.pes.pojo;

import lombok.*;

import java.util.Objects;


public class Favourite {
    private Integer fid;
    private Integer uid;
    private Integer pid;

    public Integer getId() {
        return fid;
    }

    public void setId(Integer fid) {
        this.fid = fid;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    @Override
    public String toString() {
        return "Favourite{" +
                "id=" + fid +
                ", uid=" + uid +
                ", pid=" + pid +
                '}';
    }

    public Favourite(Integer fid, Integer uid, Integer pid) {
        this.fid = fid;
        this.uid = uid;
        this.pid = pid;
    }

    public Favourite() {
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Favourite favourite = (Favourite) o;
        return Objects.equals(fid, favourite.fid) &&
                Objects.equals(uid, favourite.uid) &&
                Objects.equals(pid, favourite.pid);
    }

    @Override
    public int hashCode() {
        return Objects.hash(fid, uid, pid);
    }
}
